home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / Communication / Blank NewsNet Stack / stack_-1.xml < prev   
Encoding:
Extensible Markup Language  |  1992-08-11  |  3.1 KB  |  24 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>3</cardCount>
  7.     <cardID>16517</cardID>
  8.     <listID>2879</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>on zapem
  17. go to second card of bkgnd "Article"
  18. repeat 46
  19. domenu delete card
  20. end repeat
  21. end zapem
  22.  
  23. on getLine fileName
  24. global theLine
  25. read from file fileName until return
  26. if it is empty then
  27. put "**********" into theLine
  28. else
  29. delete last char of it
  30. put it into theLine
  31. end if
  32. put theLine into msg
  33. end getLine
  34. on import
  35. global theLine
  36. ask "Please enter name of text file:"
  37. if it is empty then exit import
  38. put it into fileName
  39. open file fileName
  40. repeat
  41. getLine fileName
  42. if theLine contains "**********" then exit import
  43. if theLine is "Copyright" then exit repeat
  44. end repeat
  45. go to last card
  46. repeat
  47. doMenu New Card
  48. -- Snarf source and dateline.
  49. getLine fileName
  50. put theLine into bkgnd field "theSource"
  51. getLine fileName
  52. put theLine into bkgnd field "theDate"
  53. -- Make sure we're still in sync!
  54. getLine fileName
  55. if length (theLine) > 1 then
  56. beep
  57. put "Bad line after date:" && theLine into msg
  58. close file fileName
  59. exit import
  60. end if
  61. -- Copy in title.  Ending line may be empty or tab.
  62. repeat
  63. getLine fileName
  64. if length(theLine) < 2 then exit repeat
  65. if last char of theLine is not space then put space after theLine
  66. put theLine after bkgnd field "theTitle"
  67. end repeat
  68. -- Copy in text lines til end of article or file
  69. put empty into thisText
  70. repeat
  71. getLine fileName
  72. if theLine is "Copyright" then exit repeat
  73. if char 1 to 10 of theLine is "**********" then
  74. put thisText into bkgnd field "theText"
  75. close file fileName
  76. exit import
  77. end if
  78. if theLine is empty then
  79. put return & return after thisText
  80. else
  81. if char 1 to 3 of theLine is "   " and thisText is not empty¬¨
  82. then put return after thisText
  83. if last char of theLine is not space then put space after theLine
  84. put theLine after thisText
  85. end if
  86. end repeat
  87. put thisText into bkgnd field "theText"
  88. -- update table of contents
  89. get the id of this card
  90. put it & return after bkgnd field "IDs" of card "Contents"
  91. put bkgnd field "theTitle" into thisTitle
  92. if thisTitle is empty then
  93. put bkgnd field "theSource" & "  ‚Äî  <untitled>" into thisTitle
  94. end if
  95. if length(thisTitle) > 60 then put char 1 to 60 of thisTitle into thisTitle
  96. put thisTitle & return after bkgnd field "Contents" of card "Contents"
  97. end repeat
  98. go to card "Contents"
  99. put the date into bkgnd field "lastDate"
  100. put the time into bkgnd field "lastTime"
  101. end import</script>
  102.     <background id="2280" file="background_2280.xml" name="" />
  103.     <background id="3126" file="background_3126.xml" name="Article" />
  104.     <background id="16241" file="background_16241.xml" name="" />
  105.     <card id="16517" file="card_16517.xml" marked="false" name="Contents" owner="16241" />
  106.     <card id="4192" file="card_4192.xml" marked="false" name="About WELL" owner="2280" />
  107.     <card id="3464" file="card_3464.xml" marked="false" name="" owner="3126" />
  108. </stack>
  109.